package edu.nwpu.zya.coreops.modules.alert.dao;

import edu.nwpu.zya.coreops.modules.alert.vo.AlertLevelCountVo;
import edu.nwpu.zya.coreops.modules.alert.vo.MetricVo;
import edu.nwpu.zya.coreops.modules.alert.vo.OccurTrendVo;
import edu.nwpu.zya.coreops.modules.alert.vo.RecoveryTrendVo;
import edu.nwpu.zya.coreops.modules.dashboard.entity.AlertTrendEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface HistoryStatisticDao {
    List<OccurTrendVo> getOccurTrend(@Param("userId") Long userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("timeGap") Integer timeGap, @Param("type") String type, @Param("instanceId") String instanceId,@Param("metricId")String metricId);

    List<RecoveryTrendVo> getRecoveryTrend(@Param("userId") Long userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("timeGap") Integer timeGap, @Param("type") String type, @Param("instanceId") String instanceId,@Param("metricId")String metricId);

    List<AlertLevelCountVo> getLevelStatistic(@Param("userId") Long userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("type") String type, @Param("instanceId") String instanceId, @Param("metricId")String metricId);

    List<MetricVo> getMetricStatistic(@Param("userId") Long userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("type") String type, @Param("instanceId") String instanceId,@Param("metricId")String metricId);

    AlertTrendEntity getHourAlertTrend(@Param("time") String time);

    AlertTrendEntity getHourAlertTrendByUserId(@Param("userId") Long userId, @Param("time") String time);
}
